package br.usp.fsi.dao;


public class DaoUtils {

	public static String obterSQLUltimoInserido(Object valueObject) {
		String nomeTabela = valueObject.getClass().getSimpleName()
				.toLowerCase();
		String id = "id_" + nomeTabela;

		String[] parametros = new String[2];
		parametros[0] = nomeTabela;
		parametros[1] = id;

		String sql = "SELECT CURRVAL(pg_get_serial_sequence('" + nomeTabela
				+ "','" + id + "'))";
		return sql;
	}

}
